![](/file/19402/ADC Tools Sampler CD Disk 3 1999.iso/Documentation/CodeWarrior/HTML/Targeting_Java_VM/images/tbar.gif)
This chapter is your introduction to targeting the Java Virtual Machine (VM) with CodeWarrior. It includes the following topics:
Before using CodeWarrior Java, read the release notes. They contain important information about any late-breaking changes.
If you are new to Java in CodeWarrior, or to CodeWarrior in general, we strongly recommend that you read this chapter carefully. You will get a high-level overview of Java in the CodeWarrior environment.
This manual assumes you have a working knowledge of your operating system and its conventions, including how to use a mouse and standard menus and commands, and how to open, save, and close file. For help with any of these techniques, see the documentation that came with your system.
The following sections describe the different conventions used in this manual:
This manual uses some style conventions to make it easier to read and find specific information:
Notes, warnings, tips, and beginner's hints
An advisory statement or NOTE may restate an important fact, or call your attention to a fact which may not be obvious.
A WARNING given in the text may call attention to something such as an operation that, if performed, could be irreversible, or flag a possible error that may occur.
A TIP can help you become more productive with the CodeWarrior IDE. Impress your friends with your knowledge of little-known facts that can only be learned by actually reading the fabulous manual!
A For Beginners note may help you better understand the terminology or concepts if you are new to programming.
Typeface conventions
If you see some text that appears in a different
typeface (as the word different
does in this sentence), you are reading file or folder names, source code, keyboard input, or programming items.
Text formatted like this
means that the text refers to an item on the screen, such as a menu command
or control
in a dialog box.
If you are using an on-line viewing application that supports hypertext navigation, such as Adobe Acrobat, you can click on underlined and colored text to view another topic or related information. For example, clicking the text "What is in This Book" in Adobe Acrobat takes you to a section that gives you an overview of the entire Targeting the Java VM manual.
CodeWarrior runs on the host platforms and operating systems listed below. Throughout this manual, a generic platform identifier is used to identify the host platform, regardless of operating system.
The specific versions of the operating system that host CodeWarrior are:
The visual interface of the hosts listed in "Host Conventions" is nearly identical in all significant respects. When discussing a particular interface element such as a dialog box or window, the screenshot may come from any of these hosts. You should have no difficulty understanding the picture, even if you are using CodeWarrior on a different host than the one shown.
However, there are occasions when dialog boxes or windows are unique to a particular host. For example, a particular dialog box may appear dramatically different on a Windows host and on a Mac OS host. In that case, a screenshot from each unique host will appear and be clearly identified so that you can see how CodeWarrior works on your preferred host.
The default keyboard shortcuts for CodeWarrior on some platforms are very similar. However, keyboards and shortcuts do vary across host platforms. For example, a typical keyboard for a Windows machine has an Alt key, but that same key is called the Option key on a typical keyboard for a Mac OS computer.
To handle these kinds of situations, CodeWarrior documentation identifies and uses the following paired terms in the text:
For example, you may encounter instructions such as "Press Enter/Return to proceed," or "Alt/Option click the Function pop-up menu to see the functions in alphabetical order." Use the appropriate key as it is labeled on your keyboard.
Some combinations of key strokes require multiple modifier keys. In those cases, key combinations are shown connected with hyphens. For example, if you read "Shift-Alt/Option-Enter/Return," you would press the Shift, Alt, and Enter keys on a Windows host and the Shift, Option, and Return keys on a Mac OS host.
Sometimes the cross-platform variation in keyboard shortcuts is more complex. In those cases, you will see more detailed instructions on how to use a keyboard shortcut for your host platform. In all cases the host and shortcut will be clearly identified.
Special Note for Solaris Users
The Solaris-hosted CodeWarrior IDE uses the same modifier key names as used for Mac OS (Shift, Command, Option, and Control). Likewise, the Key Bindings preference panel uses Mac OS symbols to represent modifier keys. The Default CodeWarrior Key Bindings appendix in the CodeWarrior IDE User Guide shows the default modifier key mappings and the symbols used to represent them. On Solaris systems, modifier keys can be mapped to any key on the keyboard. See the Keyboard Preferences Dialog Box appendix in the CodeWarrior IDE User Guide for the default key mappings. When reading this manual, you will need to keep in mind these modifier key mappings.
Following are the changes in this version of Java for CodeWarrior:
The table below gives a general description of this manual's contents.
Table 1.1 Contents of chapters
The information in this manual is, for the most part, specific to either the Java language or the Java virtual machine as a target. This manual does not cover basic features of the CodeWarrior IDE, but only Java-specific information.
You do not have to read the chapters in this manual sequentially. Use this manual as a reference to learn about Java in CodeWarrior, or to answer questions you encounter as you develop Java code.
You will find all the manuals mentioned in this section on the CodeWarrior CD.
For everyone:
If you are new to CodeWarrior:
For general information on Java programming:
This manual does not teach Java syntax, nor does it introduce you to the classes and methods in the Java API-the calls you use to program the Java virtual machine.
http://java.sun.com/doc.html
To learn more about the Java API, consult the Java API Documentation,. This document is in HTML format and is found on Sun Microsystems website:
http://java.sun.com/docs/
The CodeWarrior Reference CD contains an electronic copy of Learn Java on the Macintosh (Addison Wesley) by Barry Boone. Learn Java on the Macintosh starts off with some object programming basics, then introduces you to programming in Java. CodeWarrior also comes with some Java-related Apple Guide files.
Discover Programming from Metrowerks can teach you how to program in Java. You can learn more about Discover Programming at:
http://www.metrowerks.com/discover/
There are also many third party books on Java programming. Check your local bookstore or favorite online bookstore for a wide selection.
The Products provided by Metrowerks under the License agreement process dates only to the extent that the Products use date data provided by the host or target operating system for date representations used in internal processes, such as file modifications. Any Year 2000 Compliance issues resulting from the operation of the Products are therefore necessarily subject to the Year 2000 Compliance of the relevant host or target operating system. Metrowerks directs you to the relevant statements of Microsoft Corporation, Sun Microsystems, Inc., Apple Computer, Inc., and other host or target operating systems relating to the Year 2000 Compliance of their operating systems. Except as expressly described above, the Products, in themselves, do not process date data and therefore do not implicate Year 2000 Compliance issues.
For additional information, visit:
http://www.metrowerks.com/about/y2k.html.
Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: support@metrowerks.com
Copyright © 1999, Metrowerks Corp. All rights reserved.
Last updated: May 24, 1999
* Chris Magnuson
* John Roseborough